<template>
  <div class="sister">
    我是sister.vue ===哥哥的消息:{{ bromsg }} 哥哥的消息222:{{ bromsg1 }}
    <button @click="sendbrother">发送消息到哥哥</button>
  </div>
</template>
<script>
import { vm } from '@/ultr/Bus.js'
export default {
  name: '',

  data () {
    return {
      bromsg: '',
      bromsg1: '',
    }
  },
  created () {
  },
  computed: {
  },
  methods: {
    sendbrother () {
      vm.$emit('handlerbrother', '通讯不太行')
    }
  },
  //接收borther的消息
  mounted () {
    vm.$on('handlersister', (bmsg) => {
      console.log(bmsg);
      this.bromsg = bmsg
    }),
      this.$Bus.$on('handlersister1', (bmsg1) => {
        console.log(bmsg1);
        this.bromsg1 = bmsg1
      })
  }

}
</script>
<style lang='less'  scoped>
</style>
